<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:template match="formConstructor/field[@type='formVisualEditor']">
		<tr class="dark">
			<xsl:call-template name="fieldTitle"/>
			<td width="50%">
				<script language="javascript" type="text/javascript">
					<xsl:comment>
						window.onload = function()
						{
							var sBasePath = "<xsl:value-of select="$jsURL"/>fckeditor/";
							var oFCKeditor = new FCKeditor('<xsl:value-of select="@name"/>');
							oFCKeditor.BasePath = sBasePath;
							oFCKeditor.Height = <xsl:value-of select="@rows"/> * 10;
							oFCKeditor.Width = <xsl:value-of select="@cols"/> * 10;
							oFCKeditor.Config["AutoDetectLanguage"] = false;
							oFCKeditor.Config["DefaultLanguage"] = "<xsl:value-of select="$currentLanguage"/>";
							oFCKeditor.ReplaceTextarea();
						}
					//</xsl:comment>
				</script>
				
				<textarea name="{@name}" id="{@name}" cols="{@cols}" rows="{@rows}">
					<xsl:value-of select="." />
				</textarea>
			</td>
		</tr>
	</xsl:template>

</xsl:stylesheet>